package com.cy.util;

import com.cy.pojo.RedisLock;

/**
 * Created by Administrator on 2017/8/9.
 */
public class ReadRedisUtil {

    /**
     * 通过redis的key锁
     * @param redisType
     * @return
     */
    public static RedisLock redisKey(String redisType){
        return LockUtils.getALock("redis_" + redisType);
    }

    /**
     * 销毁锁
     * @param lock
     */
    public static void destoryLock(RedisLock lock){
        LockUtils.returnALock("redis_" + lock.getKey());
    }
}
